<%@ page language="java" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<style>
.pageFormContent label{width: 80px;}
span.error{left: 280px;}
.pageFormContent p{width:95%;}
.pageFormContent p a{line-height: 20px;padding-left:5px;color:#575757; text-decoration: none;}
</style>
<script>
$(document).ready(function(){
	$("input[type=radio][name=roleId]").live("click", function(){
		var $this = $(this);
		if($this.attr("checked" == "checked")){
			$("input[type=radio][name=roleId]").attr("checked",'0');
		}else{
			$this.attr("checked", "checked");
		}
	});
});
</script>
<div class="pageContent">
	<form method="post" action="updateEmp?callbackType=closeCurrent" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone);">
		<input type="hidden" name="sysUserId" value="${user.id }" />
		<div class="pageFormContent" layoutH="58">
			<p>
				<label>用户姓名：</label>
				<input name="userName" type="text" maxlength="16" size="30" value="${user.userName }"  class="required"/>
			</p> 
			<p>
				<label>用户电话：</label>
				<input name="telephone" maxlength="32"  type="text" size="30" value="${user.userTelephone}" />
			</p>
			<p>
				<label>用户手机：</label>
				<input name="userMobile" maxlength="32"  type="text" size="30" value="${user.userMobile }" />
			</p>
			<p>
				<label>用户邮箱</label>
				<input type="text" name="userEmail" maxlength="32" value="${user.userEmail }" class="required email" size="30" />
				<input type="hidden" name="oldUserEmail" value="${user.userEmail  }" />
			</p>
			<p>
				<label>密 码:</label>
				<input type="password" name="password" value="${user.passWord }"  size="30" readonly="readonly" />
			</p>
			<p>
				<a href="resetPwd?sysUserId=${user.id}" target="ajaxTodo"  title="确定重置此用户的密码吗?">
					<button type="button">重置密码</button>
				</a>
				(重置密码后为: <span style="color:#f60;">123456</span>)
			</p>
			<p>
				<label>状态：</label>
				<input type="radio" name="status" value="0" ${user.status == 0 ? 'checked' : ''}/><span style="color:#006400;">正 常</span>
				&nbsp;&nbsp; &nbsp; 
				<input type="radio" name="status" value="1" ${user.status == 1 ? 'checked' : ''}/><span style="color:#f00;">冻 结</span>
			</p>
			<p style="height: 60px;">
				<label>备 注:</label>
				<textarea rows="3" cols="27" name="userDesc">${user.userDesc }</textarea>
			</p>
			<p style="margin-top: -20px;"></p>
			 <p>
				<label>角 色:</label> 
				<span>
				<select style="width: 80%;" class="combox" name="roleId">
					<option value="0">-选择角色-</option>
			 	 	<c:forEach var="role" items="${roleList}" varStatus="status">
			 			<option value="${role.id }" ${role.id==user.roleId ? "selected='selected'" : "" }>${role.roleName }</option>
			 		</c:forEach>
			 	</select>
			 	</span>
			</p>
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div></li>
				<li>
					<div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
				</li>
			</ul>
		</div>
	</form>
</div>
